package com.longteng.java.web;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * Created by tianqing.wang
 * DATE : 2018/3/25
 * TIME : 上午12:45
 * PROJECT : web-lesson
 * PACKAGE : com.longteng.java.web
 *
 * @author <a href="mailto:celeskyking@163.com">tianqing.wang</a>
 */
@Component
//@Service
//@Repository
//@Controller
//@RestController
public class RandomHelper {

    private Random random = new Random();

    public int getRandom(int start,int end){
        return random.nextInt (end-start+1)+ start;
    }


}
